package com.yuye.cloud.common.model;
/**
 * 
 * common 常量类
 *
 * @author xgf
 * @version C10 2021年2月16日
 * @since SDP V300R003C10
 */
public class AgqConstant {
	/**
	* 常量池大小
	*/
	public static final int TWO_HUNDRED = 200;
	/**
	 * 一小时 有多少毫秒
	 */
	public static final int TIMESTAMP_ONE_HOUR = 1000 * 60 * 60;
	/**
	 * 一分钟 有多少毫秒
	 */
	public static final int MINUTE_TIMESTAMP = 1000 * 60;
	
	public static final Integer ZERO = 0;
	
	public static final Integer ONE = 1;
	
	public static final Integer TEN = 10;
	public static final Integer NINETEEN = 19;
	public static final Integer SIXTEEN = 16;
	public static final Integer SEVEN = 7;
	public static final Integer EIGHT = 8;
	/**
	 * yyyy-MM-dd
	 */
	public static final String YYYY_MM_DD_STR = "yyyy-MM-dd";
	/**
	 * yyyy-MM-dd HH:mm:ss
	 */
	public static final String YYYY_MM_DD_HH_MM_SS_STR = "yyyy-MM-dd HH:mm:ss";
	/**
	 * yyyy-MM-dd HH:mm
	 */
	public static final String YYYY_MM_DD_HH_MM_STR = "yyyy-MM-dd HH:mm";
	/**
	 * yyyy-MM
	 */
	public static final String YYYY_MM_STR = "yyyy-MM";
	/**
	 * yyyyMMdd
	 */
	public static final String YYYY_MM_DD_ABRIDGE_STR = "yyyyMMdd";
	/**
	 * 错误提示code 500
	 */
	public static final Integer ABNORMAL = 500;
	/**
	 * 警告提示 code 300
	 */
	public static final Integer WARNING = 300;
	

    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String GBK = "GBK";

    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";

    /**
     * 成功标记
     */
    public static final Integer SUCCESS = 200;

    /**
     * 失败标记
     */
    public static final Integer FAIL = 500;

    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 注册
     */
    public static final String REGISTER = "Register";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 当前记录起始索引
     */
    public static final String PAGE_NUM = "pageNum";

    /**
     * 每页显示记录数
     */
    public static final String PAGE_SIZE = "pageSize";

    /**
     * 排序列
     */
    public static final String ORDER_BY_COLUMN = "orderByColumn";

    /**
     * 排序的方向 "desc" 或者 "asc".
     */
    public static final String IS_ASC = "isAsc";

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 验证码有效期（分钟）
     */
    public static final long CAPTCHA_EXPIRATION = 2;

    /**
     * 令牌有效期（分钟）
     */
    public final static long TOKEN_EXPIRE = 720;

    /**
     * 参数管理 cache key
     */
    public static final String SYS_CONFIG_KEY = "sys_config:";

    /**
     * 字典管理 cache key
     */
    public static final String SYS_DICT_KEY = "sys_dict:";

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";
    /**
     * 分布式锁的前缀
     */
	public static final String LOCK_KEY_PREFIX = "LOCK_KEY";
	/**
     * 超级管理员用户名
     */
	public static final String ADMIN_USER_NAME = "admin";
	
	/**
     * 缓存client的redis key，这里是hash结构存储
     */
	public static final String CACHE_CLIENT_KEY = "oauth_client_details";
	
	/**
     * 默认token过期时间(1小时)
     */
	public static final int ACCESS_TOKEN_VALIDITY_SECONDS = 60 * 60;
	
	/**
     * redis中授权token对应的key
     */
	public static final String REDIS_TOKEN_AUTH =  "auth:";
	
	 /**
     * redis中应用对应的token集合的key
     */
	public static final String REDIS_CLIENT_ID_TO_ACCESS = "client_id_to_access:";
    /**
     * redis中用户名对应的token集合的key
     */
	public static final String REDIS_UNAME_TO_ACCESS = "uname_to_access:";
    /**
     * rsa公钥
     */
	public static final String RSA_PUBLIC_KEY = "pubkey.txt";
	
    /**
     * token请求头名称
     */
	public static final String TOKEN_HEADER = "Authorization";
	
	
	/**
     * 公共日期格式
     */
	public static final String MONTH_FORMAT = "yyyy-MM";
	public static final String DATE_FORMAT = "yyyy-MM-dd";
	public static final String DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
	public static final String SIMPLE_MONTH_FORMAT = "yyyyMM";
	public static final String SIMPLE_DATE_FORMAT = "yyyyMMdd";
	public static final String SIMPLE_DATETIME_FORMAT = "yyyyMMddHHmmss";
	public static final String TIME_ZONE_GMT8 = "GMT+8";
	
	
	
	/**
     * 是否开启自定义隔离规则 ribbon 用的
     */
	public static final  String CONFIG_RIBBON_ISOLATION_ENABLED = "yuye.ribbon.isolation.enabled";
	 /**
     * 负载均衡策略-版本号 信息头
     */
	public static final String XGF_VERSION = "z-l-t-version";
	
	/**
	 * 验证头 前部分
	 */
	public static final String BEARER_TYPE = "Bearer";
	
	/**
     * 注册中心元数据 版本号
     */
	public static final Object METADATA_VERSION = "version";
	
    /**
     * 菜单
     */
	public static final Integer MENU = 1;

    /**
     * 权限
     */
	public static final Integer PERMISSION = 2;
	/**
	 * 默认用户密码
	 */
	public static final  String DEF_USER_PASSWORD = "123456";
	
	/**
	 * 默认的导入/导出 字段名
	 */
	public static final  String EXCEL_ERROR_DETAIL = "errMsg";
	
	/**
	 * 默认的导入/导出提示语
	 */
	public static final  String EXCEL_ERROR_DETAIL_STR = "错误信息";
	
	
	/**
	 * 租户 可以看所有
	 */
	public static final  String TENANT_ALL = "tenant_all";
	
	/**
	 * 导入所默认的 错误提示信息字段
	 */
	public static final String ERRMSG = "errMsg";
}
